APR=apr-1.6.5
APRUTIL=apr-util-1.6.3

all:$(APR) $(APRUTIL) buildapr

$(APR):
	wget https://downloads.apache.org/apr/$(APR).tar.gz
	tar -xf $(APR).tar.gz
$(APRUTIL):
	wget https://downloads.apache.org/apr/$(APRUTIL).tar.gz
	tar -xf $(APRUTIL).tar.gz

buildapr:
	cp Makefile_apr $(APR)
	make -C $(APR) -f Makefile_apr	
	cp Makefile_aprutil $(APRUTIL)
	make -C $(APRUTIL) -f Makefile_aprutil

clean:
	rm -rf apr-*
	rm -rf aprutil-*
	
